<template>
    <div id="simuser">
        <p>用户名：<input type="text" v-model="username"></p>
        <p>密码：<input type="text" v-model="password"></p>
        <p>phone：<input type="text" v-model="phone"></p>
        <p>提交：<input type="button" value="绑定" @click="banguser()"></p>
    </div>
</template>
<script>
import axios from "axios"
export default {
    name:"simuser",
    data() {
        return {
            username:"",
            password:"",
            phone:"",
        }
    },
    methods:{
        banguser(){
            var form_data = new FormData()
            form_data.append("username",this.username),
            form_data.append("phone",this.phone),
            form_data.append("password",this.password),
            form_data.append("uid",sessionStorage.getItem("u_id"))
            axios({
                url:"http://127.0.0.1:8000/banguser/",
                method:"post",
                data:form_data
            }).then(res=>{
                console.log(res.data)
            })
        }
    }
}
</script>
<style>

</style>